let arr1 = [[1, 1], [2, 2]];
arr1.sort((a, b) => {
  return b[1] - a[1];
});
console.log(arr1);
